<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06</title>
  <style>
    /* 清除内外边距 */
    * {
      margin: 0;
      padding: 0;
    }
    .fu {
      background-color: rgba(255,255, 0, 0.5);
      /* 首个子元素的上外间距与最后一个子元素的下外间距会超出父元素的高度
      溢出隐藏:给父元素设置BFC结界保护 */
      overflow:  hidden;
    }
    .fu>div {
      width: 100px;
      height: 100px;
      font-size: 50px;
      color : purple;
      border: 2px solid black;
      font-weight: bold;
    }
    .z1 {
      margin-top: 30px;
    }
    .z2 {
      margin-top: 60px;
    }
    .z4 {
      margin-bottom: 50px;
    }
    .z3 {
      margin: 10px 20px 30px 40px;
      margin: 10px 20px;

      margin: 0 auto;
    }
  </style>
</head>
<body>
<div class="fu">
    <div class="z1">111</div>
    <div class="z2">222</div>
    <div class="z3">333</div>
    <div class="z4">444</div>
</div>


</body>
</html>